/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2017
 */

package models.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import common.base.mybatis.BaseEntity;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class Repairs extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "Repairs";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_STATE = "报修状态   1-已提交  2-待审核  3-审核通过";
	public static final String ALIAS_REPAIR_INFO_ID = "损坏情况id";
	public static final String ALIAS_COMPUTER_ROOM_ID = "机房id";
	public static final String ALIAS_COMPUTER_ID = "电脑id";
	public static final String ALIAS_USER_ID = "用户id";
	
	//date formats
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	
	private java.lang.Integer id;
	
	private java.lang.String state;
	
	private java.lang.Integer repairInfoId;
	
	private java.lang.Integer computerRoomId;
	
	private java.lang.Integer computerId;
	
	private java.lang.Integer userId;
	//columns END

	public Repairs(){
	}

	public Repairs(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setState(java.lang.String value) {
		this.state = value;
	}
	
	public java.lang.String getState() {
		return this.state;
	}
	public void setRepairInfoId(java.lang.Integer value) {
		this.repairInfoId = value;
	}
	
	public java.lang.Integer getRepairInfoId() {
		return this.repairInfoId;
	}
	public void setComputerRoomId(java.lang.Integer value) {
		this.computerRoomId = value;
	}
	
	public java.lang.Integer getComputerRoomId() {
		return this.computerRoomId;
	}
	public void setComputerId(java.lang.Integer value) {
		this.computerId = value;
	}
	
	public java.lang.Integer getComputerId() {
		return this.computerId;
	}
	public void setUserId(java.lang.Integer value) {
		this.userId = value;
	}
	
	public java.lang.Integer getUserId() {
		return this.userId;
	}
	
	private RepairInfo repairInfo;
	
	public void setRepairInfo(RepairInfo repairInfo){
		this.repairInfo = repairInfo;
	}
	
	public RepairInfo getRepairInfo() {
		return repairInfo;
	}
	
	private Computers computers;
	
	public void setComputers(Computers computers){
		this.computers = computers;
	}
	
	public Computers getComputers() {
		return computers;
	}
	
	private Users users;
	
	public void setUsers(Users users){
		this.users = users;
	}
	
	public Users getUsers() {
		return users;
	}
	
	private ComputerRoom computerRoom;
	
	public void setComputerRoom(ComputerRoom computerRoom){
		this.computerRoom = computerRoom;
	}
	
	public ComputerRoom getComputerRoom() {
		return computerRoom;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("State",getState())
			.append("RepairInfoId",getRepairInfoId())
			.append("ComputerRoomId",getComputerRoomId())
			.append("ComputerId",getComputerId())
			.append("UserId",getUserId())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Repairs == false) return false;
		if(this == obj) return true;
		Repairs other = (Repairs)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

